package com.developer.platform.controller.monitor;

import com.developer.platform.domain.Server;
import com.veeker.log.annotations.Log;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：qiaoliang
 * @date ：2020-11-06
 */
@Api(tags = "服务器管理")
@Validated
@RestController
@RequestMapping("/monitor/server")
public class ServerController {

    @Log(businessType = "服务器管理",discription = "查询服务器状态")
    @ApiOperation(value = "查询服务器状态")
    @GetMapping
    public ResponseEntity<Server> getInfo() throws Exception {
        Server server = new Server();
        server.copyTo();
        return ResponseEntity.ok(server);
    }

}
